package com.wyiot.pet.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wyiot.pet.model.entity.PetDO;
import com.wyiot.pet.mapper.PetMapper;
import com.wyiot.pet.model.vo.PetVO;
import org.springframework.stereotype.Service;

/**
 * 宠物Service
 *
 * @author yly
 * @since 2022/3/24
 */
@Service
public class PetService extends ServiceImpl<PetMapper, PetDO> {
    /**
     * 查询宠物列表
     * @param userId 用戶id
     */
    public Page<PetVO> queryPetListByUserId(Integer pageNum , Integer pageSize , Long userId){
        return baseMapper.selectListByUserId(Page.of(pageNum,pageSize) ,userId);
    }
}
